package router

import (
	"gitcode.com/G-YT/iHealth25/server/plugin/weixin/api"
	"github.com/gin-gonic/gin"
)

type WeChatRouter struct {
}

type WxPayRouter struct {
}

// InitWeChatRouter 初始化微信相关路由
func (w *WeChatRouter) InitWeChatRouter(Router *gin.RouterGroup) {
	weChatRouter := Router
	weChatApi := api.ApiGroupApp.WeChatApi
	{
		weChatRouter.POST("getOpenID", weChatApi.GetOpenID) // 获取用户openID
	}
}

// InitWxPayRouter 初始化微信支付相关路由
func (w *WxPayRouter) InitWxPayRouter(Router *gin.RouterGroup) {
	wxPayRouter := Router
	wxPayApi := api.ApiGroupApp.WxPayApi
	{
		wxPayRouter.POST("createJSAPIOrder", wxPayApi.CreateJSApiOrder) // 通用JSAPI支付接口
		wxPayRouter.POST("notify", wxPayApi.PaymentNotify)              // 微信支付回调接口
	}
}
